#include "GuiCreator.h"
using namespace core;

HudEventReceiver * GuiCreator::receiver = NULL;
IGUIEnvironment * GuiCreator::env = NULL;
SAppContext GuiCreator::Context;

GuiCreator::GuiCreator()
{
}


GuiCreator::~GuiCreator()
{
}

void GuiCreator::initGuiCreator(IGUIEnvironment* env, IrrlichtDevice* device)
{
	GuiCreator::env = env;
	Context.device = device;

	receiver = new HudEventReceiver(Context);
}

void GuiCreator::createHUD()
{
	env->addButton(rect<s32>(0, 240, 110, 240 + 32), 0, GUI_ID_QUIT_BUTTON, L"Quit", L"Exists Game");
	//env->addButton(rect<s32>(10, 10, 110, 240 + 32), 0, GUI_ID_PAUSE_BUTTON, L"Pause", L"Pause Game");
}

HudEventReceiver* GuiCreator::getEventReceiver()
{
	return receiver;
}